import { request } from '../utils/request.js'
import store from '../store'
import { Toast } from '../utils/tools.js'

//获取资讯详情
export async function GetNewsInfo(params) {
	console.log('params===>',params)
	try {
		let {success,data,msg} = await request({
			url: '/News/GetNewsInfo',
			method: "post",
			mask: false,
			params
		})
	   return data;
	} catch (e) {
		console.log(e)
		return {}
	}
}

//获取资讯分页
export async function GetNewsPage(params) {
	try {
		let {success,totalCount,msg,list,pageCount} = await request({
			url: '/News/GetNewsPage',
			method: "post",
			mask: false,
			data:params
		})
	   return {list,success,msg,pageCount};
	} catch (e) {
		console.log(e)
		return []
	}
}
